/***************************************************************************
 *   Copyright (C) 2004, 2005 by tonton                                    *
 *   tontonNOSPAM@team1664.org                                             *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef TEXT_H
#define TEXT_H

#include "internal.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file text.h
 * @author tonton1664
 * @date 2005
 * @brief Functions for displaying text in mode 0xD3
 */

/**
 * Displays a string using a small font
 * Everything is relative to the bottom right corner
 * @param x the x offset where to display the text
 * @param y the y offset where to display the text
 * @param str The string to display
 * @warning x and y are not checked, you can write outside the buffer
 * @fn void print_small(uint16_t x, uint16_t y, const char* str)
 */
extern void __CLIB print_small(uint16_t x, uint16_t y, const char* str);

/**
 * Displays a string using a small font in a buffer
 * Everything is relative to the bottom right corner
 * @param x the x offset where to display the text
 * @param y the y offset where to display the text
 * @param str The string to display
 * @param buf the address of the buffer in the segment
 * @param buf_width the width of the buffer (in bytes)
 * @warning x and y are not checked, you can write outside the buffer
 * @fn void print_small_in_buf(uint16_t x, uint16_t y, const char* str, FARPTR buf, uint16_t buf_width)
 */
extern void __CLIB print_small_in_buf(uint16_t x, uint16_t y, const char* str, FARPTR buf, uint16_t buf_width);

/**
 * Displays a string using a normal font
 * Everything is relative to the bottom right corner
 * @param x the x offset where to display the text
 * @param y the y offset where to display the text
 * @param str The string to display
 * @warning x and y are not checked, you can write outside the buffer
 * @fn void print_norm(uint16_t x, uint16_t y, const char* str)
 */
extern void __CLIB print_norm(uint16_t x, uint16_t y, const char* str);

/**
 * Displays a string using a normal font in a buffer
 * Everything is relative to the bottom right corner
 * @param x the x offset where to display the text
 * @param y the y offset where to display the text
 * @param str The string to display
 * @param buf the address of the buffer in the segment
 * @param buf_width the width of the buffer (in bytes)
 * @warning x and y are not checked, you can write outside the buffer
 * @fn void print_norm_in_buf(uint16_t x, uint16_t y, const char* str, FARPTR buf, uint16_t buf_width)
 */
extern void __CLIB print_norm_in_buf(uint16_t x, uint16_t y, const char* str, FARPTR buf, uint16_t buf_width);

/**
 * Displays a string using a big font
 * Everything is relative to the bottom right corner
 * @param x the x offset where to display the text
 * @param y the y offset where to display the text
 * @param str The string to display
 * @warning x and y are not checked, you can write outside the buffer
 * @fn void print_big(uint16_t x, uint16_t y, const char* str)
 */
extern void __CLIB print_big(uint16_t x, uint16_t y, const char* str);

/**
 * Displays a string using a big font in a buffer
 * Everything is relative to the bottom right corner
 * @param x the x offset where to display the text
 * @param y the y offset where to display the text
 * @param str The string to display
 * @param buf the address of the buffer in the segment
 * @param buf_width the width of the buffer (in bytes)
 * @warning x and y are not checked, you can write outside the buffer
 * @fn void print_big_in_buf(uint16_t x, uint16_t y, const char* str, FARPTR buf, uint16_t buf_width)
 */
extern void __CLIB print_big_in_buf(uint16_t x, uint16_t y, const char* str, FARPTR buf, uint16_t buf_width);


#ifdef __cplusplus
};
#endif


#endif